import request from '@/utils/request.js'


// 登录接口
export const login = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/login',
    data
  })
}

// 静默登录
export const jinmoLogin = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/loginAuto',
    data
  })
}

// 修改密码
export const updatePwd = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/updatePwd',
    data
  })
}

// 首页接口接口
export const indexdata = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/indexdata',
    data
  })
}

// 余额变更记录
export const voucherRecord = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherRecord',
    data
  })
}

// 代金券发放记录
export const voucherUserRecord = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherUserRecord',
    data
  })
}

// 助理列表
export const getStaff = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getStaff',
    data
  })
}
// 新增助理
export const addStaff = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/addStaff',
    data
  })
}

// 助理管理
export const manageStaff = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/manageStaff',
    data
  })
}
// 扫码接口
export const scan = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/scan',
    data
  })
}

// 扫码
export const scandata = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/scandata',
    data
  })
}

// 赠券1
export const addVoucher = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/addVoucher',
    data
  })
}

// 减券
export const deductVoucher = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/deductVoucher',
    data
  })
}


// 赠券2
export const quotaRecharge = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/quotaRecharge',
    data
  })
}



// 超管管理商户
export const manage = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/manage',
    data
  })
}

// 超管重置密码
export const resetPwd = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/resetPwd',
    data
  })
}

// 超管管理商户 ban
export const ban = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/ban',
    data
  })
}

// 超管管理商户 allow
export const allow = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/allow',
    data
  })
}

// 店长获取二维码内容（点预览用）
export const getqrcode = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getqrcode',
    data
  })
}

// 店长修改二维码内容（点确认金额用）
export const setqrcode = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/setqrcode',
    data
  })
}

// 店长或助理审核领券列表
export const voucherApplyLIst = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherApplyLIst',
    data
  })
}

// 店长或助理审核领券
export const voucherApplyConfirm = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/voucherApplyConfirm',
    data
  })
}

// 获取邀请新用户链接
export const getUrlLink = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getUrlLink',
    data
  })
}

// 社长收入
export const revenue = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/revenue',
    data
  })
}

// 充值记录
export const rechargeRecode = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/rechargeRecode',
    data
  })
}

// 提现申请列表
export const withdrawList = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/withdrawList',
    data
  })
}

// 提现申请
export const withdraw = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/withdraw',
    data
  })
}


// 分红
export const dividend = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/dividend',
    data
  })
}

//支付
export const pay = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/pay',
    data
  })
}

//支付查询
export const checkpay = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/checkpay',
    data
  })
}


//会员类型列表
export const getMemberType = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/getMemberType',
    data
  })
}

//设置会员类型
export const setVip = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/setVip',
    data
  })
}


//店长换人
export const replaceManager = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/replaceManager',
    data
  })
}

//创建比赛
export const newGame = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/newGame',
    data
  })
}

//比赛列表
export const getGameList = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/getGameList',
    data
  })
}

//获取座位
export const getDetail = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/getDetail',
    data
  })
}


//店长占座或取消
export const lockSeat = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/lockSeat',
    data
  })
}

//提交邀请函
export const sumbitInvitation = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/sumbitInvitation',
    data
  })
}

//邀请函内容返回
export const getinvitation = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/getinvitation',
    data
  })
}

//确认时间
export const confirmTime = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/confirmTime',
    data
  })
}

//确认结果
export const confirmResult = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/confirmResult',
    data
  })
}

//比赛结果
export const gameResult = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/gameResult',
    data
  })
}

//赛事收支
export const income = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/mj/publics/income',
    data
  })
}

//上传图片
export const getuser = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/uploadImage',
    data
  })
}

//新增商品
export const storeFront = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/storeNew',
    data
  })
}

//修改商品
export const editStore = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/editStore',
    data
  })
}

//商品列表
export const storeList = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/storeList',
    data
  })
}

//上架下架
export const pullStore = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/pullStore',
    data
  })
}

//订单列表
export const orderWxList = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/orderWxList',
    data
  })
}

//修改订单状态
export const orderUpdate = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/store/publics/orderUpdate',
    data
  })
}

//超管管理店长是否开启店铺
export const setStore = (data) => {
  return request({
    method: 'POST',
    url: '/CloudPhoneMain/v1/publics/setStore',
    data
  })
}